﻿using System.Net.Http.Formatting;
using System.Web.Http;

namespace DualReferralServer
{
    public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {
            // Web API 配置和服务

            //启用log4net配置
            log4net.Config.XmlConfigurator.Configure();


            // Web API 路由
            config.MapHttpAttributeRoutes();

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "{controller}/{action}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );
        }


    }
}
